<#assign contextPath=springMacroRequestContext.getContextPath() />
<#import "/public/frame/main.html" as frame />
<@frame.head "南航明珠商城-评论审核">
</@frame.head>
<link rel="stylesheet" type="text/css" href="${contextPath}/resources/css/search_table.css" />
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 后台管理中心 <span class="c-gray en">&gt;</span> 商品管理 <span class="c-gray en">&gt;</span> 评论审核 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
<form method="post" name="query_compaints_prosals_form"  id="query_compaints_prosals_form" action="${contextPath}/compaints_proposals/query_compaints_prosals" >    
   <input type="hidden" name="page" value="${pagination.pageNo}"  id="page" />                        
    <div class="text-c">
        <table class="table search_table">
           <tr>  
           <td>商品编号：</td>
           <td><input type="text" class="input-text  radius"  placeholder="商品编号" id="" name="productId" value="${(compaintsProposalsQo.productId?c)!}"   onKeyUp="value=value.replace(/[^0123456789]/g,'')"></td>     
           <td>评论时间：</td>
           <td><input  type="text" onfocus="WdatePicker({ maxDate:'#F{$dp.$D(\'endDate\')||\'%y-%M-%d\'}',readOnly: true })" id="startDate" 
               value='${(compaintsProposalsQo.beginDate?string("yyyy-MM-dd"))!}' name="beginDate"  class="input-text Wdate" style="width:45%;">
                                                至
               <input  type="text" onfocus="WdatePicker({ minDate:'#F{$dp.$D(\'startDate\')}',maxDate:'%y-%M-%d',readOnly: true })" id="endDate" 
               value='${(compaintsProposalsQo.endDate?string("yyyy-MM-dd"))!}' name="endDate"    class="input-text Wdate" style="width:45%;">
           </td>   
           <td>审核状态：</td>
           <td>
           <span class="select-box radius">
           <select class="select"  name="state" >
           <option value>请选择</option>
           <option value="1" <#if 1==compaintsProposalsQo.state>selected="selected"</#if>>未审核</option>
           <option value="2" <#if 2==compaintsProposalsQo.state>selected="selected"</#if>>审核通过</option>
           <option value="3" <#if 3==compaintsProposalsQo.state>selected="selected"</#if>>审核不通过</option>
           </select>
           </span>
           </td>
          </tr>
         <tr> 
         <td colspan="6" style="text-align:center;" >
           <input class="btn btn-success radius" type="button"  onclick="search();"  value="搜索" />
           <input class="btn btn-success radius" type="button"  onclick="toIsEmpty();" value="重置" />
         </td>
         </tr>
      </table>
    </div>
</form>

    <div class="cl pd-5 bg-1 bk-gray mt-20"> 
    <span class="l">
     <a href="javascript:;" onclick="checkOk();" class="btn btn-primary radius"> 批量通过审核</a> 
    </span>
    <span class="r">共有数据：<strong>${pagination.totalCount}</strong> 条</span> </div>
    <table class="table table-border table-bordered table-bg">
        <thead>
        <tr>
            <th scope="col" colspan="10">评价列表</th>
        </tr>
        <tr  class="text-c">
             <th>
            <input  type="checkbox" id="checkAll"/>
            </th>
            <th >商品编号</th>
            <th >商品名称</th>
            <th >商品质量</th>
            <th >物流配送</th>
            <th >页面设计</th>
            <th >售后服务</th>
            <th width="70px">评论时间</th>
            <th >审核状态</th>
            <th >操作</th>
        </tr>
        </thead>
        <tbody>
       <#if pagination.list?? && (pagination.list?size &gt; 0) >
        <#list pagination.list as compaintsProposals> 
             <tr  class="text-c">
                <td> <#if compaintsProposals.state==1><input type="checkbox" name="ids" value="${compaintsProposals.id?c}" /></#if> </td>
                <td>${(compaintsProposals.product.id?c)!}</td>
                <td>${compaintsProposals.product.baseInfo.name}</td>
                <td>
                <div class="clearfix  mt-10">
	              <div class="star-bar star-bar-show size-M f-l va-m mr-10"  style="text-align:left;">
		           <span class="star star-${compaintsProposals.goodsQuality}"></span>
	              </div>
                 </div>
                </td>
                <td>
                 <div class="clearfix  mt-10">
	              <div class="star-bar star-bar-show size-M f-l va-m mr-10"  style="text-align:left;">
		           <span class="star star-${compaintsProposals.distribution}"></span>
	              </div>
                 </div>
                </td>
                <td>
                 <div class="clearfix  mt-10">
	              <div class="star-bar star-bar-show size-M f-l va-m mr-10"  style="text-align:left;">
		           <span class="star star-${compaintsProposals.pageDesign}"></span>
	              </div>
                 </div>                
                </td>
                <td>
                <div class="clearfix  mt-10">
	              <div class="star-bar star-bar-show size-M f-l va-m mr-10"  style="text-align:left;">
		           <span class="star star-${compaintsProposals.afterSaleService}"></span>
	              </div>
                 </div>      
                </td>
                <td>${(compaintsProposals.createDate?string("yyyy-MM-dd"))!}</td>
                <td>
                 <#if 1==compaintsProposals.state><span class="label radius" >未审核</span></#if>
                 <#if 2==compaintsProposals.state><span class="label label-success radius" >审核通过</span></#if>
                 <#if 3==compaintsProposals.state><span class="label label-danger radius" >审核不通过</span></#if>
                <td>					
               	<a href="javaScript:void(0);" onclick="layer_show('评价审核查看','${contextPath}/compaints_proposals/get_compaints_proposalsById?id=${compaintsProposals.id?c}','600','500');">查看</a>							
               </td>
        </tr>
      </#list></#if>
     </tbody>
    </table>
    <div id="div_page" style="padding-top: 10px;float: right"></div>
</div>
<@frame.end "default">
</@frame.end>
</html>
<script type="text/javascript" src="${contextPath}/resources/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/laypage/laypage.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/compaints_proposals/query_compaints_prosals.js""></script>
<script type="text/javascript">
var path="${contextPath}";
laypage({
    cont: 'div_page',//容器。值支持id名、原生dom对象，jquery对象。
    pages: ${pagination.totalPage},//通过后台拿到的总页数
    curr:  ${pagination.pageNo} || 1, //当前页
	skip: true, //是否开启跳页
	first: 1, //将首页显示为数字1,。若不显示，设置false即可
	last: ${pagination.totalPage}, //将尾页显示为总页数。若不显示，设置false即可
    jump: function(obj , first){//触发分页后的回调
        if(!first){ //点击跳页触发函数;当前页为obj.curr
            $("#page").val(obj.curr);
            $("#query_compaints_prosals_form").submit();
        }
    }
})  
</script>